package Year22_Month07.day07;

public class 移除链表元素_递归版本 {
    public ListNode removeElements(ListNode head, int val) {
        if(head == null) return head;
        head.next = removeElements(head.next,val);
        return head.val == val? head.next : head;
    }
}
